﻿using UnityEngine;
using Com.ZX;

public abstract class BaseUnit : MonoBehaviour,IBase
{
    //public enum UnitTag {Player,Enemy,Other }

    public virtual int Id { get; set; }

    public virtual void onInit() { }

    public virtual void onDestroy() { }

    protected virtual void onAwake() { }

    protected virtual void onStart() { }

    protected virtual void onUpdate() { }

    protected virtual void onEnable() { }

    void Awake()
    {
        onAwake();
    }

    void Start()
    {
        onInit();
        onStart();
    }

    void OnEnable()
    {
        onEnable();
    }

    void Update()
    {
        onUpdate();
    }

}
